<section>
   
    <ul class="cart">	
     
     <li class="tot">Total pris: <?php echo $this->cart->total() ?></li>
     <li class="tot">Antal produkter: <?php echo $this->cart->total_items() ?></li>
  

	<?php 
		if(!$this->cart->contents())
		{
			echo "<li>Inget i varukorgen</li>";
		}
		else
		{
			foreach($this->cart->contents() as $items)
			{
				echo "<li>Namn:" . $items['name'] . "<br/>Pris: " . $items['price'] . "<br/>Antal: " . $items['qty'] . "</li>";
			}
		}	
	 ?>  
    </ul>
	<?php 
		if($this->cart->contents())
		{
			$attributes = array(
					'id' 			=> 'emptyCartForm');
			echo form_open('/cart/remove', $attributes);
			$data1 = array(
					'name'          => 'emptyCart',
			        'value'         => 'Töm',
			        'type'          => 'submit',
					'class' 		=> 'cartButtons'
			);
			
			echo form_submit($data1);
			echo form_close();
		
	    	echo form_open('/cart/checkout'); 
	    	
	    		$data = array(
					'name'          => 'button',
			        'value'         => 'Checkout',
			        'type'          => 'submit',
					'class' 		=> 'cartButtons'
	    		);
	    	echo form_submit($data);
	    	echo form_close();
		}
    ?>

</section>